package com.zjlp.seproject.mapper;

import com.zjlp.seproject.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;
@Mapper
public interface CourseMapper {
    List<Course> selectAll();

    int deleteByPrimaryKey(Integer id);

    int insert(Course record);

    Course selectByPrimaryKey(Integer id);

    int updateByPrimaryKey(Course record);

    @Select("select id from course where name = #{name}")
    Integer getid(String name);

    @Select("select name from course where id = #{id}")
    String getName(Integer id);
}